<!DOCTYPE html>
<html lang="zh" xmlns:th="http://www.thymeleaf.org" >
<head>
	<th:block th:include="include :: header('新增污水指标')" />
</head>
<body class="white-bg">
    <div class="wrapper wrapper-content animated fadeInRight ibox-content">
        <form class="form-horizontal m" id="form-sewageIndex-add">
			<div class="form-group">	
				<label class="col-sm-3 control-label"><span style="color: red; ">*</span>污水指标：</label>
				<div class="col-sm-8">
					<input id="indexName" name="indexName" class="form-control" type="text" maxlength="20" required>
				</div>
			</div>
      <div class="form-group">
        <label class="col-sm-3 control-label"><span style="color: red; ">*</span>出水水质：</label>
        <div class="col-sm-8">
          <input id="indexQuality" name="indexQuality" class="form-control" type="text" maxlength="5" required>
        </div>
      </div>
      <div class="form-group">
        <label class="col-sm-3 control-label"><span style="color: red; ">*</span>指标排序：</label>
        <div class="col-sm-8">
          <input id="indexSort" name="indexSort" class="form-control" type="text" maxlength="2" required>
        </div>
      </div>
		</form>
	</div>
    <div th:include="include::footer"></div>
    <script type="text/javascript">
		var prefix = ctx + "sewage/sewageIndex"
		$("#form-sewageIndex-add").validate({
			rules:{
        indexSort:{
          digits:true
				},
        indexQuality:{
          number:true
        }
			},
			focusCleanup: true
		});
		
		function submitHandler() {
	        if ($.validate.form()) {
	            $.operate.save(prefix + "/add", $('#form-sewageIndex-add').serialize());
	        }
	    }
	</script>
</body>
</html>
